<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>时间线记录内存变化</title>
</head>
<body>
  <button id="btn">Add</button>

  <script>
    const arrList = []
    function test () {
      console.log('click')
      for (let i = 0; i < 10 * 10000; i++ ) {
        document.body.appendChild(document.createElement('p'))
      }
      arrList.push(new Array(100 * 10000).join('x'))
    }

    btn.addEventListener('click', test)
  </script>
</body>
</html>
